<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!--

	this file outputs php code that contains an array
	containing ISBN related data.
	
	this code can be used by the ISBN php class.
	
	the datasource is a javascript file (.js) located on the website
	of the international ISBN angency (see blow).
	
	you need an javascript enabled browser to output the code.
	
	version: 0.1.3
			 
 -->
<html>
<head>
	<title>ISBN Code-Generator - Ranges</title>
</head>
<body>
<h1>/* ISBN Code-Generator - Ranges */</h1>
<!--
	read external datasource:
-->
<script src="http://www.isbn-international.org/converter/ranges.js" language="javascript" type="text/javascript"></script>
<script language="javascript" type="text/javascript">
document.write('<pre>');
/* loop through array with ID numbers 
 * then output object-data
 */
for (i=0; i<gi.idarr.length; i++) {
	mid = gi.idarr[i];
	marea = "area" + mid;
	if (! gi[marea] ) {
		alert ("Definition error\n\nNo object for area " + mid);
	} else {
		/* csv output */
		sGroup = mid.toString();
		sGrouptext = gi[marea].text;
		sPubrange = gi[marea].pubrange;

		/* filter Grouptext
		 * escape , to make csv parsing easy
		 */
		sGrouptext = sGrouptext.replace(/,/g, ';');

		document.write( sGroup + ',' + sGrouptext + ',' + sPubrange + '\n');
	}	
}
document.write('</pre>');
</script>
</body>
</html>